/* SPDX-License-Identifier: Apache-2.0 */

@mixin link-focus-state($color) {
  &:focus,
  &:active {
    outline: 1px solid $color;
  }
}

@mixin colored-link($color) {
  color: $color;

  &:hover {
    color: darken($color, 10);
  }

  @include link-focus-state($color);
}

@mixin primary-underlined-link {
  @include colored-link($primary-color);
}

@mixin danger-underlined-link {
  @include colored-link($danger-color);
}

@mixin warning-underlined-link {
  @include colored-link($warning-color);
}

@mixin success-underlined-link {
  @include colored-link($success-color);
}

@mixin white-underlined-link {
  @include colored-link($white);
}

@mixin link-without-underline {
  text-decoration: none;

  &:hover {
    text-decoration: none;
  }
}
